package dang.action.main;

import java.util.List;

import dang.common.Constant;
import dang.dao.DaoFactory;
import dang.entity.Product;
import dang.exception.DangException;

public class NewBookAction {
	private List<Product> newBooks;
	private int num;
	public String execute() throws DangException{
		newBooks=DaoFactory.getProductDao(Constant.TYPE_BOOK).findLatest(num);
		return "success";
	}

	public List<Product> getNewBooks() {
		return newBooks;
	}

	public void setNewBooks(List<Product> newBooks) {
		this.newBooks = newBooks;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

}
